all:pub_client sub_client topic_server

# 发布版本构建
pub_client:publish_client.cc
	g++ -g -O0 -o $@ $^ -std=c++17 -lpthread -ljsoncpp -lmuduo_net -lmuduo_base

sub_client:subscribe_client.cc
	g++ -g -O0 -o $@ $^ -std=c++17 -lpthread -ljsoncpp -lmuduo_net -lmuduo_base

topic_server:topic_server.cc
	g++ -g -O0 -o $@ $^ -std=c++17 -lpthread -ljsoncpp -lmuduo_net -lmuduo_base

.PHONY:clean
clean:
	rm -f pub_client sub_client topic_server